package leetcode.singlemodel;

/**
 * @author :songyaozhang
 * @date :Created 2021/8/3 19:44
 * @description :
 */
public class DoubleCheck_volatile {
    private DoubleCheck_volatile(){};

    private static DoubleCheck_volatile instance;

    public static DoubleCheck_volatile getInstance() {
        if (instance == null) {
            synchronized (DoubleCheck_volatile.class) {
                if (instance == null) {
                    instance = new DoubleCheck_volatile();
                }
            }
        }
        return instance;
    }
}
